www.gusucode.com > vc++ 远程控制示例源程序-源码程序 > vc++ 远程控制示例源程序-源码程序\code\PeerYouC\RegeditAddKeyDlg.cpp

    // RegeditAddKeyDlg.cpp : implementation file
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "PeerYouC.h"
#include "RegeditAddKeyDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRegeditAddKeyDlg dialog


CRegeditAddKeyDlg::CRegeditAddKeyDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CRegeditAddKeyDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CRegeditAddKeyDlg)
	m_key = _T("");
	//}}AFX_DATA_INIT
}


void CRegeditAddKeyDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CRegeditAddKeyDlg)
	DDX_Text(pDX, IDC_KEY, m_key);
	DDV_MaxChars(pDX, m_key, 256);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CRegeditAddKeyDlg, CDialog)
	//{{AFX_MSG_MAP(CRegeditAddKeyDlg)
	ON_BN_CLICKED(IDC_OK, OnOk)
	ON_BN_CLICKED(IDC_CANCEL, OnCancel)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRegeditAddKeyDlg message handlers

void CRegeditAddKeyDlg::OnOk() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	if(m_key.GetLength()==0)
	{
		MessageBox("请输入一个确定值");
		return;
	}
	CDialog::OnOK();
}

void CRegeditAddKeyDlg::OnCancel() 
{
	// TODO: Add your control notification handler code here
	CDialog::OnCancel();
}